package excel;



import java.util.HashSet;
import java.util.Set;

public enum DynamicMethodConst {

    lv(DynamicMethodScript.class, true, false, ""), //
    ;

    private final Class<? extends DynamicMethodScript> hostClass;// 方法所在类，默认是ActivityMethodScript
    private final boolean playerNotNull;// 玩家不能为空(玩家如果不能为空，则不能配置到服务器条件中)
    private final String explain;// 方法说明，生成文档用
    private final boolean cashrs;
    private static final Set<String> notCashRsMethod = new HashSet<>();

    static {
        for(DynamicMethodConst t:values()){
            if(!t.cashrs){
                notCashRsMethod.add(t.name());
            }
        }
    }

    private DynamicMethodConst(Class<? extends DynamicMethodScript> hostClass, boolean playerNotNull, boolean cashrs, String explain) {
        this.hostClass = hostClass;
        this.playerNotNull = playerNotNull;
        this.cashrs = cashrs;
        this.explain = explain;
    }

    public Class<?> getHostClass() {
        return hostClass;
    }

    public boolean isPlayerNotNull() {
        return playerNotNull;
    }

    public String getExplain() {
        return explain;
    }

    public static Set<String> getNotCashRsMethod() {
        return notCashRsMethod;
    }
}
